package com.itheima.demo5;

import java.io.FileInputStream;
import java.io.IOException;

public class IODemo3 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("a.txt");

        //read表示读取数据，且每读取一次数据，移动一次指针
        int read = fis.read();
        System.out.println(read);

        //循环读取
        int b;
        while ((b = fis.read()) != -1){
            System.out.print((char)b);
        }



        fis.close();


    }
}
